﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SmartMathLibrary.Management.Pipe
{
    /// <summary>
    /// This class has to be inherited to build a new pipeitem with special interactions.
    /// </summary>
    [Serializable]
    public abstract class AbstractPipeItem
    {
        /// <summary>
        /// The collection of pipevalues.
        /// </summary>
        protected PipeValueCollection pipeValues;

        /// <summary>
        /// The method, which has to be overwrite to add interaction to a new pipeitem.
        /// </summary>
        /// <param name="workingItem">The working item.</param>
        /// <param name="index">The index.</param>
        public abstract void WorkOn(ref Object workingItem, int index);

        /// <summary>
        /// Sets the current pipevalues of the pipe.
        /// </summary>
        /// <param name="values">The values of the pipe.</param>
        public void RefreshPipeValues(ref PipeValueCollection values)
        {
            this.pipeValues = values;
        }
    }
}